xen/arm: physical irq follow virtual irq
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Wed, 13 Aug 2014 16:29:39 +0000 (17:29 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 3 Sep 2014 14:23:25 +0000 (15:23 +0100)
commit5bd62a757b9e39abc62dcb2a8c0cd2ab429c7c4c
tree0bff09dd3bf3a606a4676c7b2c112b44bcc4b152
parent489abfd46a568b4fca578f80ba66e3b4de6f2298
xen/arm: physical irq follow virtual irq

Migrate physical irqs to the same physical cpu that is running the vcpu
expected to receive the irqs. That is done when enabling irqs, when the
guest writes to GICD_ITARGETSR and when Xen migrates a vcpu to a
different pcpu.

In case of virq migration, if the virq is inflight and in a GICH_LR
register already, delay migrating the corresponding physical irq until
the virq is EOIed by the guest and the MIGRATING flag has been cleared.
This way we make sure that the pcpu running the old vcpu gets
interrupted with a new irq of the same kind, clearing the GICH_LR sooner.

Introduce a new arch specific function, arch_move_irqs, that is empty on
x86 and implements the vgic irq migration code on ARM.
arch_move_irqs is going to be called by from sched.c.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <julien.grall@linaro.org>
xen/arch/arm/gic-v2.c
xen/arch/arm/gic.c
xen/arch/arm/irq.c
xen/arch/arm/vgic.c
xen/include/asm-arm/irq.h
xen/include/asm-x86/irq.h